<template>
  <el-card>
    <h3>临床项目管理</h3>
    <el-table :data="items" style="width: 100%">
      <el-table-column prop="code" label="项目编号" />
      <el-table-column prop="name" label="项目名称" />
      <el-table-column prop="unit" label="单位" />
      <el-table-column prop="price" label="价格">
        <template slot-scope="scope">
          <el-input v-model="scope.row.price" size="small" />
        </template>
      </el-table-column>
      <el-table-column label="操作">
        <template slot-scope="scope">
          <el-button type="primary" size="mini" @click="saveItem(scope.row)">保存</el-button>
        </template>
      </el-table-column>
    </el-table>
  </el-card>
</template>

<script>
export default {
  name: "Lcxm",
  data() {
    return {
      items: [
        { code: "LC001", name: "血常规", unit: "项", price: "20" },
        { code: "LC002", name: "尿常规", unit: "项", price: "15" },
        { code: "LC003", name: "肝功能", unit: "项", price: "50" },
      ],
    };
  },
  methods: {
    saveItem(row) {
      this.$message.success(`项目“${row.name}”已保存（模拟）`);
    },
  },
};
</script> 